layui.define(['layer'], function (exports) {

    var formField = {
        components: {
            input: {
                id: '-1',
                index: '-1',
                label: "单行文本",
                tag: "input",
                tagIcon: 'input',
                placeholder: "请输入",
                defaultValue: null,
                labelWidth: 110,
                width: "100%",
                clearable: true,
                maxlength: null,
                showWordLimit: false,
                readonly: false,
                disabled: false,
                required: true,
                expression: "",
                document: ''
            },
            password: {
                id: '-1',
                index: '-1',
                label: "密码框",
                tag: "password",
                tagIcon: 'password',
                placeholder: "请输入",
                defaultValue: null,
                labelWidth: 110,
                width: "100%",
                clearable: true,
                maxlength: null,
                showWordLimit: false,
                readonly: false,
                disabled: false,
                required: true,
                document: ''
            },
            select: {
                id: '-1',
                index: '-1',
                label: "下拉框",
                tag: "select",
                tagIcon: 'select',
                labelWidth: 110,
                width: "100%",
                disabled: false,
                required: true,
                document: '',
                datasourceType: 'local',
                remoteUrl: 'http://',
                remoteMethod: 'post',
                remoteOptionText: 'options.data.dictName',//映射到text
                remoteOptionValue: 'options.data.dictId',//映射到value text和value可以是一样的
                remoteDefaultValue: '12',//表示对应的remoteOptionValue的值
                options: [
                    {
                        text: '选项1',
                        value: '值1',
                        checked: true,
                    },
                    {
                        text: '选项2',
                        value: '值2',
                        checked: false,
                    },
                    {
                        text: '选项3',
                        value: '值3',
                        checked: false,
                    },
                ]
            },
            radio: {
                id: '-1',
                index: '-1',
                label: "单选组",
                tag: "radio",
                tagIcon: 'radio',
                labelWidth: 110,
                disabled: false,
                document: '',
                datasourceType: 'local',
                remoteUrl: 'http://',
                remoteMethod: 'post',
                remoteOptionText: 'options.data.dictName',//映射到text
                remoteOptionValue: 'options.data.dictId',//映射到value text和value可以是一样的
                options: [
                    {
                        text: '选项1',
                        value: '值1',
                        checked: true,
                    },
                    {
                        text: '选项2',
                        value: '值2',
                        checked: false,
                    },
                    {
                        text: '选项3',
                        value: '值3',
                        checked: false,
                    },
                ]
            },
            checkbox: {
                id: '-1',
                index: '-1',
                label: "复选组",
                tag: "checkbox",
                tagIcon: 'checkbox',
                labelWidth: 110,
                disabled: false,
                required: true,
                document: '',
                datasourceType: 'local',
                remoteUrl: 'http://',
                remoteMethod: 'post',
                remoteOptionText: 'options.data.dictName',//映射到text
                remoteOptionValue: 'options.data.dictId',//映射到value text和value可以是一样的
                options: [
                    {
                        text: '选项1',
                        value: '值1',
                        checked: true,
                    },
                    {
                        text: '选项2',
                        value: '值2',
                        checked: true,
                    },
                    {
                        text: '选项3',
                        value: '值3',
                        checked: false,
                    },
                ]
            },
            switch: {
                id: '-1',
                index: '-1',
                label: "开关",
                tag: "switch",
                tagIcon: 'switch',
                labelWidth: 110,
                width: "100%",
                switchValue: false,
                showWordLimit: false,
                disabled: false,
                document: '',
            },
            slider: {
                id: '-1',
                index: '-1',
                label: "滑块",
                tag: "slider",
                tagIcon: 'slider',
                labelWidth: 110,
                width: "100%",
                defaultValue: 10,
                maxValue: 100,
                minValue: 1,
                stepValue: 2,
                isInput: true,
                disabled: false,
                document: '',
            },
            numberInput: {
                id: '-1',
                index: '-1',
                label: "排序文本框",
                tag: "numberInput",
                tagIcon: 'numberInput',
                labelWidth: 110,
                width: "100%",
                defaultValue: 0,
                maxValue: 100,
                minValue: 0,
                stepValue: 1,
                disabled: false,
                document: '',
            },
            bottom: {
                id: '-1',
                index: '-1',
                label: "按钮组件",
                tag: "bottom",
                tagIcon: 'bottom',
                labelWidth: 110,
                buttonIcon: "",
                buttonVlaue: "按钮",
                buttonType: "",
                buttonSize: "",
                isLabel: true,
                disabled: false,
                document: '',
            },
            sign: {
                id: '-1',
                index: '-1',
                label: "签名组件",
                tag: "sign",
                tagIcon: 'sign',
                labelWidth: 110,
                buttonVlaue: "手写签名",
                buttonIcon: "",
                data: "",
                disabled: false,
                document: '',
            },
            cron: {
                id: '-1',
                index: '-1',
                label: "Cron表达式",
                tag: "cron",
                tagIcon: 'cron',
                placeholder: "请输入cron表达式,如:0 0 12 * * ?",
                labelWidth: 110,
                width: "100%",
                defaultValue: '* * * * * ?',
                cronUrl: '',
                disabled: false,
                required: true,
                document: '',
            },
            date: {
                id: '-1',
                index: '-1',
                label: "日期",
                tag: "date",
                tagIcon: 'date',
                labelWidth: 110,
                width: "100%",
                clearable: true,
                maxlength: null,
                dateDefaultValue: '2021-05-25',
                dateType: "date",//year month date time datetime
                range: false,
                dateFormat: "yyyy-MM-dd",
                isInitValue: false,
                dataMaxValue: "2088-12-31",
                dataMinValue: "1900-01-01",
                trigger: null,//自定义弹出控件的事件
                position: "absolute",//fixed,static,abolute
                theme: "default",
                mark: null,//每年的日期	{'0-9-18': '国耻'}	0 即代表每一年
                showBottom: true,
                zindex: 66666666,
                disabled: false,
                required: true,
                document: '',
            },
            dateRange: {
                id: '-1',
                index: '-1',
                label: "日期范围",
                tag: "dateRange",
                tagIcon: 'dateRange',
                labelWidth: 110,
                //width:"100%",
                dateRangeDefaultValue: "2021-06-19 - 2021-07-17",
                clearable: true,
                maxlength: null,
                dateType: "date",//year month date time datetime
                dateFormat: "yyyy-MM-dd",
                isInitValue: true,
                dataMaxValue: "2088-12-31",
                dataMinValue: "1900-01-01",
                trigger: null,//自定义弹出控件的事件
                position: "absolute",//fixed,static,abolute
                theme: "default",
                mark: null,//每年的日期	{'0-9-18': '国耻'}	0 即代表每一年
                showBottom: true,
                zindex: 66666666,
                disabled: false,
                required: true,
                document: '',
            },
            rate: {
                id: '-1',
                index: '-1',
                label: "评分",
                tag: "rate",
                tagIcon: 'rate',
                labelWidth: 110,
                defaultValue: 0,
                rateLength: 5,//星星长度
                half: false,
                text: false,
                theme: "default",
                showBottom: true,
                readonly: false,
                document: '',
            },
            carousel: {
                id: '-1',
                index: '-1',
                label: "轮播图",
                tag: "carousel",
                tagIcon: 'carousel',
                width: "100%",
                height: "500px",
                full: false,//是否全屏
                anim: "default", //轮播切换动画方式,
                interval: 3000,//切换时间 毫秒
                startIndex: 0,//初始索引
                arrow: "hover",//切换箭头默认显示状态
                autoplay: true,//是否自动切换
                document: '',
                datasourceType: 'local',
                remoteUrl: 'http://',
                remoteMethod: 'post',
                remoteOptionText: 'options.data.dictName',//映射到text
                remoteOptionValue: 'options.data.dictId',//映射到value text和value可以是一样的
                options: [
                    {
                        text: 'banner1',
                        value: szoa.client.path + '/static/img/banner1.PNG',
                        checked: true,
                    },
                    {
                        text: 'banner2',
                        value: szoa.client.path + '/static/img/banner2.PNG',
                        checked: false,
                    },
                    {
                        text: 'banner3',
                        value: szoa.client.path + '/static/img/banner3.PNG',
                        checked: false,
                    },
                ]
            },
            colorpicker: {
                id: '-1',
                index: '-1',
                label: "颜色选择器",
                tag: "colorpicker",
                tagIcon: 'colorpicker',
                labelWidth: 110,
                defaultValue: 'rgba(0, 0, 0, 1)',
                colorformat: "#fff",
                alpha: false,
                colors: [],
                size: "",
                showBottom: true,
                required:false
            },
            file: {
                id: '-1',
                index: '-1',
                label: "上传文件",
                tag: "file",
                tagIcon: 'file',
                required: false,
                uploadUrl: '/pages/files/upfiles.html?id=7',
                i_avatar:'i_avatar',
                src_avatar:'src_avatar',
                u_avatar:'u_avatar'
            },
            textarea: {
                id: '-1',
                index: '-1',
                label: "多行文本",
                tag: "textarea",
                tagIcon: 'textarea',
                placeholder: "请输入",
                defaultValue: null,
                width: "100%",
                readonly: false,
                disabled: false,//这里就是readonly的医生
                required: true,
                document: ''
            },
            layuieditor: {
                id: '-1',
                index: '-1',
                label: "编辑器",
                tag: "layuieditor",
                tagIcon: 'layuieditor',
                height: '150px',
                isLabel:true,
                defaultValue:'',
            },
            iceeditor: {
                id:'-1',
                index:'-1',
                label: "编辑器",
                tag: "iceeditor",
                tagIcon: 'iceeditor',
                width:"100%",
                clearable: true,
                maxlength: null,
                showWordLimit: false,
                menu: ['face','table',
                'files', 'music', 'video', 'insertImage','backColor', 'fontSize', 'foreColor', 'bold', 'italic', 'underline', 'strikeThrough', 'justifyLeft', 'justifyCenter', 'justifyRight',
                 'indent', 'outdent', 'insertOrderedList', 'insertUnorderedList', 'superscript', 'subscript', 'createLink', 'unlink', 'hr',  'removeFormat', 'code', 'line'
                ],
                height: "200px",
                disabled:false,
                defaultValue:'',
                document: ''
            },
            grid: {
                id: '-1',
                index: '-1',
                tag: 'grid',
                span: 2,
                columns: [
                    {
                        span: 12,
                        list: [],
                    },
                    {
                        span: 12,
                        list: [],
                    }
                ]
            },
            tab: {
                id: '-1',
                index: '-1',
                tag: "tab",
                height: '300px',
                maxtablen: 5,
                options: [
                    {
                        text: '选项1',
                        value: 'tab1',
                        checked: true,
                        list: []
                    },
                    {
                        text: '选项2',
                        value: 'tab2',
                        checked: false,
                        list: []
                    },
                ]
            },
        },
        componentsLang: [
            {
                component: "c1",
                name: "输入型、选择型",
                list: [
                    { "key": "input", "icon": "layui-icon layui-icon-layer" },
                    { "key": "password", "icon": "layui-icon layui-icon-auz" },
                    { "key": "textarea", "icon": "layui-icon layui-icon-list" },
                    { "key": "select", "icon": "layui-icon layui-icon-align-left" },
                    { "key": "radio", "icon": "layui-icon layui-icon-radio" },
                    { "key": "checkbox", "icon": "layui-icon layui-icon-list" },
                    { "key": "switch", "icon": "layui-icon layui-icon-key" },
                    { "key": "slider", "icon": "layui-icon layui-icon-slider" },
                    { "key": "date", "icon": "layui-icon layui-icon-time" },
                    { "key": "rate", "icon": "layui-icon layui-icon-rate-solid" },
                    { "key": "carousel", "icon": "layui-icon layui-icon-carousel" },
                    { "key": "colorpicker", "icon": "layui-icon layui-icon-theme" },
                    { "key": "file", "icon": "layui-icon layui-icon-picture" },
                    { "key": "dateRange", "icon": "layui-icon layui-icon-date" }
                ]
            },
            {
                component: "c2",
                name: "布局、扩展、编辑器",
                list: [
                    { "key": "grid", "icon": "layui-icon layui-icon-layouts" },
                    { "key": "bottom", "icon": "layui-icon layui-icon-email" },
                    { 'key': "tab", "icon": "layui-icon layui-icon-tabs" },
                    { "key": "numberInput", "icon": "layui-icon layui-icon-top" },
                    { "key": "cron", "icon": "layui-icon layui-icon-survey" },
                    { "key": "sign", "icon": "layui-icon layui-icon-layer" },
                    { "key": "layuieditor", "icon": "layui-icon layui-icon-layer" },
                    { "key": "iceeditor", "icon": "layui-icon layui-icon-layer" }
                ]
            },
            {
                component: "c3",
                name: "功能型",
                list: [
                    { "key": "fixed_Dept", "icon": "layui-icon layui-icon-release" },
                    { "key": "fixed_Employee", "icon": "layui-icon layui-icon-release" },
                    { 'key': "fixed_Company", "icon": "layui-icon layui-icon-release" },
                    { "key": "fixed_Client", "icon": "layui-icon layui-icon-release" },
                    { "key": "fixed_Files", "icon": "layui-icon layui-icon-release" },
                    { "key": "fixed_Flow", "icon": "layui-icon layui-icon-release" },
                    { "key": "fixed_ShenPi", "icon": "layui-icon layui-icon-release" },
                    { "key": "fixed_Comment", "icon": "layui-icon layui-icon-release" },
                    { "key": "fixed_Opinion", "icon": "layui-icon layui-icon-release" },
                ]
            }
        ],
    }
    exports('formField', formField);

});